package com.yuyue.note02.error;

/**
 * 自定义系统异常类
 */
public class SystemException extends RuntimeException{
    //错误码
    private String errorCod;

    //构造器，设置错误码和错误信息
    public SystemException(String errorCod, String message) {
        super(message);
        this.errorCod = errorCod;
    }

    //构造器，设置错误码、错误信息和错误
    public SystemException(String errorCod, String message, Throwable cause) {
        super(message, cause);
        this.errorCod = errorCod;
    }

    //set、 get
    public void setErrorCod(String errorCod) {
        this.errorCod = errorCod;
    }

    public String getErrorCod() {
        return errorCod;
    }
}
